package com.cloud.api.user.repository;

import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.stereotype.Repository;

import com.cloud.model.PlayUser;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface PlayUserESRepository extends ReactiveCrudRepository<PlayUser, String> {

	public Mono<PlayUser> findByUsername(String username);

	public Mono<Integer> countByUsername(String username);

	public Mono<PlayUser> findByEmail(String email);

	public Mono<PlayUser> findByMobileAndPassword(String username, String password);

	public Flux<PlayUser> findByOrgi(String orgi, Pageable page);

	public Flux<PlayUser> findByOrgiAndOnline(String orgi, boolean online, Pageable page);
}
